// The Wild outdoor script

beginoutdoorscript;
variables;
short choice;

body;

beginstate INIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 10;
	if (get_flag(1,10) == 0)	{
		message_dialog("You have now entered the aptly named Wild.  The terrain is extremely diverse and nowhere within is a suitable place for settlement.","One one side there is Mogrim Marsh, a vast wasteland.  North is the Giant's Forest, which your destination lies beyond.  It will certainly be a tough journey.");
		set_flag(1,10,1);	}
break;

beginstate 11;
	if (get_flag(1,0) == 0)	{
		message_dialog("Far in the marsh, you come upon a small pile of foilage.  Unfortunately, this foilage is home for a group of slightly oversized spiders...","");
		create_out_spec_enc(0);
		set_flag(1,0,1);	}
break;

beginstate 12;
	message_dialog("Finally you slay the last of the beastly spiders.  Nothing useful can be found except for their poison glands.  You take the slimy things, determined to make use of this deadly encounter.","");
	change_spec_item(1,1);
break;

beginstate 13;
	message_dialog("Three shady looking men approach you, and after looking you over, they draw their blades.  It seems they intend to take your possesions after slitting your throat.","");
break;

beginstate 14;
	message_dialog("On the corpse of the strongest bandit you find a large sack of valuables.  It could be sold for a lot.","");
	change_coins(250);
break;

beginstate 15;
	if (get_flag(1,3) == 0)	{
		message_dialog("Right before you is the feared Giant's Forest.  The forest itself is giant.  You can only see one path through the forest from here; the trees are so crowded that you can't walk between them.","This must be good soil for so many trees to grow, but you don't think it will be used for agricultural purposes for a while.  At least not while the Giant's Forest lives up to its name.");
		set_flag(1,3,1);	}
break;

beginstate 16;
	if (get_flag(1,4) == 0)	{
		message_dialog("A little enclosed area higher up in the mountains is being used as a campsite for a few of the fouler species in this area.  A large band of ogres and goblins, accompanied by a few pet Worgs, are settled here.","They are hesitant to attack you, but it looks like they would be willing to fight if you get too close.");
		set_flag(1,4,1);	}
break;

beginstate 17;
	if ((get_highest_skill(16) >= 4) && (get_flag(1,5) == 0))	{
		message_dialog("As you pass through this area of the marsh, you notice a few useful herbs lying nearby.  Your knowledge of plant lore tells you that these are spiritual herbs, a useful ingredient in many potions.","");
		reward_give(215);
		reward_give(215);
		set_flag(1,5,1);	}
break;

beginstate 18;
	if (get_flag(1,13) == 0)	{
		reset_dialog();
		add_dialog_str(0,"As you come nearer, you notice two large golem creatures guarding the path between the rocks.  They turn toward you and stare with calculating eyes.  One of them moves toward you.  _Hold,_ it says in a mechanical voice.",0);
		add_dialog_str(1,"_You cannot pass through here.  You cannot enter the Cave.  We will not allow it.  If you try, we will destroy you._",0);
		add_dialog_choice(0,"How did you come to be here?");
		add_dialog_choice(1,"Move aside.  I'm going in.");
		add_dialog_choice(2,"I won't try to go in, then.");
		choice = run_dialog(1);
		if (choice == 3)	{
			message_dialog("_Good,_ it says.  Then it slowly lumbers back to its guard position.","");
			block_entry(1);	}
		else	{
			if (choice == 2)	{
				message_dialog("_Foolish beings.  I warn you once more.  Do not approach or you will be destroyed._  It walks back to its post, ready for you to take another step forward.","");
				set_flag(1,13,1);	}
			else	{
				reset_dialog();
				add_dialog_str(0,"_Our master summoned us and commanded that we prevent adventurers from entering.  He wished to stop them from killing themselves, so we are to destroy those who approach._  Then it stops, realizing the contradiction.",0);
				add_dialog_str(1,"_I recall that the master was a little drunk when he did this.  Nevertheless, we will obey.  So do not approach or you will be killed._",0);
				add_dialog_choice(0,"Who is your master?");
				add_dialog_choice(1,"I understand.");
				choice = run_dialog(1);
				if (choice == 2)	{
					message_dialog("_Good,_ it says.  Then it slowly lumbers back to its guard position.","");
					block_entry(1);	
					set_flag(1,13,1);	}
				else 	{
					message_dialog("_Our master is a powerful wizard who is traveling around, trying to benefit the world.  He also, unfortunately, enjoys alcohol._  It pauses.  _Anyway.  Do not approach or you will be destroyed._","It walks back to its position.");
					set_flag(1,13,1);
					block_entry(1);		}	}	}	}
break;

beginstate 19;
	if (get_flag(1,14) == 0)	{
		message_dialog("You approach the golem despite the warning.  _Foolish,_ it says, and then strides forward to meet you.","");
		set_flag(1,14,1);	}
break;

beginstate 20;
	create_out_spec_enc(1);
break;

beginstate 21;
	create_out_spec_enc(2);
break;

beginstate 22;
	message_dialog("Once the group of snakes have been put to rest, you remove one of the asps' tongues and pocket it.  Asptongue is often a useful alchemical ingredient, and you are sure you can find some way to profit from having one.","");
	change_spec_item(2,1);
break;